package com.inossem.utils.chart;

import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;

/**
 * Created by leij on 2017/12/21.
 */

public class LeftYAxisValueFormatter implements IAxisValueFormatter {

    private ChartBean mChartBean;

    public LeftYAxisValueFormatter(ChartBean chartBean) {
        mChartBean = chartBean;
    }

    @Override
    public String getFormattedValue(float value, AxisBase axis) {
        return String.valueOf((float) (Math.round(value * 1)) / 1) + mChartBean.getLeftAxisUnit();
    }
}
